Optimal. Leaf size=97 \[ -\frac{2 i d^2 \text{PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^3}+\frac{2 i d^2 \text{PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^3}+\frac{4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac{(c+d x)^2 \sec (a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0684212, antiderivative size = 97, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {4409, 4181, 2279, 2391} \[ -\frac{2 i d^2 \text{PolyLog}\left (2,-i e^{i (a+b x)}\right )}{b^3}+\frac{2 i d^2 \text{PolyLog}\left (2,i e^{i (a+b x)}\right )}{b^3}+\frac{4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac{(c+d x)^2 \sec (a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4409
Rule 4181
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int (c+d x)^2 \sec (a+b x) \tan (a+b x) \, dx &=\frac{(c+d x)^2 \sec (a+b x)}{b}-\frac{(2 d) \int (c+d x) \sec (a+b x) \, dx}{b}\\ &=\frac{4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac{(c+d x)^2 \sec (a+b x)}{b}+\frac{\left (2 d^2\right ) \int \log \left (1-i e^{i (a+b x)}\right ) \, dx}{b^2}-\frac{\left (2 d^2\right ) \int \log \left (1+i e^{i (a+b x)}\right ) \, dx}{b^2}\\ &=\frac{4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}+\frac{(c+d x)^2 \sec (a+b x)}{b}-\frac{\left (2 i d^2\right ) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}+\frac{\left (2 i d^2\right ) \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^{i (a+b x)}\right )}{b^3}\\ &=\frac{4 i d (c+d x) \tan ^{-1}\left (e^{i (a+b x)}\right )}{b^2}-\frac{2 i d^2 \text{Li}_2\left (-i e^{i (a+b x)}\right )}{b^3}+\frac{2 i d^2 \text{Li}_2\left (i e^{i (a+b x)}\right )}{b^3}+\frac{(c+d x)^2 \sec (a+b x)}{b}\\ \end{align*}
Mathematica [A] time = 1.71315, size = 174, normalized size = 1.79 \[ \frac{\frac{2 d^2 \csc (a) \left (i \text{PolyLog}\left (2,-e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-i \text{PolyLog}\left (2,e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )+\left (b x-\tan ^{-1}(\cot (a))\right ) \left (\log \left (1-e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )-\log \left (1+e^{i \left (b x-\tan ^{-1}(\cot (a))\right )}\right )\right )\right )}{\sqrt{\csc ^2(a)}}+b^2 (c+d x)^2 \sec (a+b x)-4 b c d \tanh ^{-1}\left (\cos (a) \tan \left (\frac{b x}{2}\right )+\sin (a)\right )-4 d^2 \tan ^{-1}(\cot (a)) \tanh ^{-1}\left (\cos (a) \tan \left (\frac{b x}{2}\right )+\sin (a)\right )}{b^3} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.135, size = 227, normalized size = 2.3 \begin{align*} 2\,{\frac{{{\rm e}^{i \left ( bx+a \right ) }} \left ({d}^{2}{x}^{2}+2\,cdx+{c}^{2} \right ) }{b \left ({{\rm e}^{2\,i \left ( bx+a \right ) }}+1 \right ) }}+{\frac{4\,idc\arctan \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{2}}}+2\,{\frac{{d}^{2}\ln \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ) x}{{b}^{2}}}+2\,{\frac{{d}^{2}\ln \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ) a}{{b}^{3}}}-2\,{\frac{{d}^{2}\ln \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) x}{{b}^{2}}}-2\,{\frac{{d}^{2}\ln \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) a}{{b}^{3}}}-{\frac{2\,i{d}^{2}{\it dilog} \left ( 1+i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}+{\frac{2\,i{d}^{2}{\it dilog} \left ( 1-i{{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}}-{\frac{4\,i{d}^{2}a\arctan \left ({{\rm e}^{i \left ( bx+a \right ) }} \right ) }{{b}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.595668, size = 1166, normalized size = 12.02 \begin{align*} \frac{b^{2} d^{2} x^{2} + 2 \, b^{2} c d x + b^{2} c^{2} + i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) + i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right )\right ) - i \, d^{2} \cos \left (b x + a\right ){\rm Li}_2\left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right )\right ) -{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) +{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right ) -{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) +{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) -{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) + \sin \left (b x + a\right ) + 1\right ) +{\left (b d^{2} x + a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-i \, \cos \left (b x + a\right ) - \sin \left (b x + a\right ) + 1\right ) -{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) + i \, \sin \left (b x + a\right ) + i\right ) +{\left (b c d - a d^{2}\right )} \cos \left (b x + a\right ) \log \left (-\cos \left (b x + a\right ) - i \, \sin \left (b x + a\right ) + i\right )}{b^{3} \cos \left (b x + a\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c + d x\right )^{2} \tan{\left (a + b x \right )} \sec{\left (a + b x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (d x + c\right )}^{2} \sec \left (b x + a\right ) \tan \left (b x + a\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]